/**
 * BeanIsAlreadyAdviced.java
 * 
 * Created on Jul 10, 2008 at 12:55:21 AM
 */
package org.lego4j.internal;

import org.springframework.aop.Advisor;
import org.springframework.aop.framework.Advised;

/**
 * TODO add javadoc to BeanIsAlreadyAdviced
 *
 * @author <a href="alexguev@gmail.com">Alexei Guevara</>
 * @version $Revision:$ updated on $Date:$ by $Author:$
 */
public class BeanIsAlreadyAdvicedAddAdvicePolicy implements IAddAdvicePolicy {

    public static final IAddAdvicePolicy INSTANCE = new BeanIsAlreadyAdvicedAddAdvicePolicy();
    
    private BeanIsAlreadyAdvicedAddAdvicePolicy() {
    }

    public void doAddAdvisor(Object theBean, Advisor theAdvisor) {
        ((Advised) theBean).addAdvisor( theAdvisor );
    }

}
